<html>
<head>
<meta name="layout" content="main">
<style type="text/css">
.bold {
font-weight:bold;
}
</style>
</head>
<body>
<h2>View-1 [Requires Login]</h2>
<br>
<h4>This View Uses Spring Security/Scaffolding/Validation for Patron CRUD</h4>
<h4><g:link controller="patron">Admin View of Patron</g:link><br></h4>
(UserID/pwd is admin/admin or admin2/admin2)<br>
<br>

<h2>View-2 [No Login Required]</h2>
<br>
<h4>This View Uses a REST-ful POST Call for Patron Creation only. As Patrons shouldnt be allowed to edit,delete,see lists, or update due to having No Scope for Authorization</h4>

<br>
<h4><g:link controller="patron" action="add">Restful Interface for End User</g:link></h4> ( Based on Ajax/jQuery/Rest to avoid tight-coupling)

<br>
<br>
<p>
<span class="bold">Notes:</span>
The Admin View of Patron-Creation has a small flaw.<br>
When the admin creates the User - his locale will be picked up instead of the User desired to be added.<br>
This can be done away with a hack of adding ( ?lang=PREFERRED_LOCALE) in the URL. 
</p>
<br>
<p> 	
Or introducing a Locale Field in the DB.
But since that was not mentioned as one of the Fields in the Specs.
I had to resort to a transient variable 'lang' so that Locales are picked up from the User's Settings and manually inserted to allow the Custom Validation of the Domain Object's emailAddres Field
Patrons whose browser languages are not set to a locale of one of 'en', 'es', 'pt_BR' will not be able to create an account.
<br>
<span class="bold">Spring Security</span> has been added and all Admin is derived from Scaffolding.
<br>
Three Security Roles <span class="bold">Admin, SuperAdmin and User</span> are created in bootstrap and corresponding Users as well.
<br>
The Current application is seamlessly working with the <span class="bold">in-memory Java Database and in MySQL</span> in production mode in Cloudfoundry
<br>
 For running in In-memory Java DB use:
 <span class="bold">grails -Dgrails.env=h2 run-app // The  custom environment 'h2' </span>
 Otherwise:
 <span class="bold">grails prod run-app // Production</span>
 <br>
 <br>

All Code has been uploaded to SVN at: 
<br>
svn checkout http://libraryusers.googlecode.com/svn/trunk/ libraryusers-read-only
<br>
All Code is running at CloudFoundry: libraryUsers.cloudfoundry.com
<br>

</p>




</body>
</html>